Skip to content

updates#415

Merged
MervinPraison merged 1 commit intomainfrom
develop
Mar 11, 2025
Merged

updates#415
MervinPraison merged 1 commit intomainfrom
develop

Conversation

@MervinPraison
Copy link
Copy Markdown
Owner

No description provided.

@MervinPraison MervinPraison merged commit 5597f8f into main Mar 11, 2025
2 of 5 checks passed
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @MervinPraison, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

Summary of Changes

This pull request introduces interactive "Playground" sections to several documentation pages, including the main index, introduction, quickstart, and agents introduction. These playgrounds embed an iframe that allows users to execute Python code snippets directly within the documentation, providing a hands-on experience with the concepts being taught. The embedded code uses the OpenAI API to generate a response to a simple "Hello World" prompt.

Highlights

  • Interactive Playgrounds: Adds interactive code execution iframes to documentation pages for a more engaging learning experience.
  • OpenAI Integration: The playground uses the OpenAI API (gpt-3.5-turbo) to execute a basic chat completion, demonstrating AI interaction.
  • Consistent Implementation: The same playground iframe is added to multiple documentation pages (index, introduction, quickstart, agents introduction) for consistency.

Changelog

Click here to see the changelog
  • docs/course/agents/01-introduction.mdx
    • Added an iframe to embed a code execution environment for interactive learning.
    • The iframe points to a Replit server running a Python script that uses the OpenAI API.
    • The embedded code executes a simple 'Hello World' chat completion with gpt-3.5-turbo.
  • docs/index.mdx
    • Introduced a 'Playground' section with an embedded iframe for code execution.
    • The iframe allows users to interact with a Python script that uses the OpenAI API.
    • The embedded code executes a simple 'Hello World' chat completion with gpt-3.5-turbo.
  • docs/introduction.mdx
    • Added a 'Playground' section with an embedded iframe for code execution.
    • The iframe points to a Replit server running a Python script that uses the OpenAI API.
    • The embedded code executes a simple 'Hello World' chat completion with gpt-3.5-turbo.
  • docs/quickstart.mdx
    • Introduced a 'Playground' section with an embedded iframe for code execution.
    • The iframe allows users to interact with a Python script that uses the OpenAI API.
    • The embedded code executes a simple 'Hello World' chat completion with gpt-3.5-turbo.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.


In documentation's realm, a playground's born,
Where code comes alive, no longer forlorn.
With OpenAI's grace, and Python's might,
'Hello World' echoes, in digital light.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@netlify
Copy link
Copy Markdown

netlify bot commented Mar 11, 2025

Deploy Preview for praisonai ready!

Name Link
🔨 Latest commit 6738433
🔍 Latest deploy log https://app.netlify.com/sites/praisonai/deploys/67d005c4b92e86000839053b
😎 Deploy Preview https://deploy-preview-415--praisonai.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

The pull request introduces interactive playgrounds to several documentation pages, allowing users to experiment with the PraisonAI framework directly within the documentation. This is a great way to improve user engagement and understanding. However, there are a few potential issues that need to be addressed.

Summary of Findings

  • Duplicated iframe code: The same iframe code block is repeated across multiple files. This duplication increases the risk of inconsistencies and makes maintenance more difficult. Consider creating a reusable component or partial for the iframe.
  • Iframe security considerations: The iframe's allow attribute includes clipboard-read and clipboard-write. While these permissions might be necessary for certain use cases, they also introduce potential security risks. Ensure that the code execution server is properly secured to prevent malicious code from accessing the user's clipboard.

Merge Readiness

The addition of interactive playgrounds is a valuable enhancement to the documentation. However, the duplicated code and potential security concerns need to be addressed before merging. I recommend refactoring the iframe code into a reusable component and carefully reviewing the security implications of the iframe's permissions. I am unable to approve this pull request, and recommend that others review and approve this code before merging.

width="100%"
height="600px"
frameborder="0"
allow="clipboard-read; clipboard-write"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The allow attribute includes clipboard-read and clipboard-write. While these permissions might be necessary, they also introduce potential security risks. Ensure that the code execution server is properly secured to prevent malicious code from accessing the user's clipboard.

width="100%"
height="600px"
frameborder="0"
allow="clipboard-read; clipboard-write"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The allow attribute includes clipboard-read and clipboard-write. While these permissions might be necessary, they also introduce potential security risks. Ensure that the code execution server is properly secured to prevent malicious code from accessing the user's clipboard.

width="100%"
height="600px"
frameborder="0"
allow="clipboard-read; clipboard-write"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The allow attribute includes clipboard-read and clipboard-write. While these permissions might be necessary, they also introduce potential security risks. Ensure that the code execution server is properly secured to prevent malicious code from accessing the user's clipboard.

width="100%"
height="600px"
frameborder="0"
allow="clipboard-read; clipboard-write"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The allow attribute includes clipboard-read and clipboard-write. While these permissions might be necessary, they also introduce potential security risks. Ensure that the code execution server is properly secured to prevent malicious code from accessing the user's clipboard.

Comment on lines +54 to +63
<iframe
id="codeExecutionFrame"
src="https://code-execution-server-praisonai.replit.app/?code=import%20openai%0A%0Aclient%20%3D%20openai.OpenAI()%0Aresult%20%3D%20client.chat.completions.create(%0A%20%20%20%20model%3D%22gpt-3.5-turbo%22%2C%0A%20%20%20%20messages%3D%5B%0A%20%20%20%20%20%20%20%20%7B%22role%22%3A%20%22user%22%2C%20%22content%22%3A%20%22Hello%20World%22%7D%0A%20%20%20%20%5D%0A)%0A%0Aprint(result.choices%5B0%5D.message.content)"
width="100%"
height="600px"
frameborder="0"
allow="clipboard-read; clipboard-write"
scrolling="yes"
onload="resizeIframe(this)"
></iframe>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This iframe code block is duplicated in other files. Consider creating a reusable component or partial to avoid duplication and ensure consistency. This will make maintenance easier and reduce the risk of inconsistencies across the documentation.

Comment on lines +275 to +284
<iframe
id="codeExecutionFrame"
src="https://code-execution-server-praisonai.replit.app/?code=import%20openai%0A%0Aclient%20%3D%20openai.OpenAI()%0Aresult%20%3D%20client.chat.completions.create(%0A%20%20%20%20model%3D%22gpt-3.5-turbo%22%2C%0A%20%20%20%20messages%3D%5B%0A%20%20%20%20%20%20%20%20%7B%22role%22%3A%20%22user%22%2C%20%22content%22%3A%20%22Hello%20World%22%7D%0A%20%20%20%20%5D%0A)%0A%0Aprint(result.choices%5B0%5D.message.content)"
width="100%"
height="600px"
frameborder="0"
allow="clipboard-read; clipboard-write"
scrolling="yes"
onload="resizeIframe(this)"
></iframe>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This iframe code block is duplicated in other files. Consider creating a reusable component or partial to avoid duplication and ensure consistency. This will make maintenance easier and reduce the risk of inconsistencies across the documentation.

Comment on lines +317 to +326
<iframe
id="codeExecutionFrame"
src="https://code-execution-server-praisonai.replit.app/?code=import%20openai%0A%0Aclient%20%3D%20openai.OpenAI()%0Aresult%20%3D%20client.chat.completions.create(%0A%20%20%20%20model%3D%22gpt-3.5-turbo%22%2C%0A%20%20%20%20messages%3D%5B%0A%20%20%20%20%20%20%20%20%7B%22role%22%3A%20%22user%22%2C%20%22content%22%3A%20%22Hello%20World%22%7D%0A%20%20%20%20%5D%0A)%0A%0Aprint(result.choices%5B0%5D.message.content)"
width="100%"
height="600px"
frameborder="0"
allow="clipboard-read; clipboard-write"
scrolling="yes"
onload="resizeIframe(this)"
></iframe>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This iframe code block is duplicated in other files. Consider creating a reusable component or partial to avoid duplication and ensure consistency. This will make maintenance easier and reduce the risk of inconsistencies across the documentation.

Comment on lines +243 to +252
<iframe
id="codeExecutionFrame"
src="https://code-execution-server-praisonai.replit.app/?code=import%20openai%0A%0Aclient%20%3D%20openai.OpenAI()%0Aresult%20%3D%20client.chat.completions.create(%0A%20%20%20%20model%3D%22gpt-3.5-turbo%22%2C%0A%20%20%20%20messages%3D%5B%0A%20%20%20%20%20%20%20%20%7B%22role%22%3A%20%22user%22%2C%20%22content%22%3A%20%22Hello%20World%22%7D%0A%20%20%20%20%5D%0A)%0A%0Aprint(result.choices%5B0%5D.message.content)"
width="100%"
height="600px"
frameborder="0"
allow="clipboard-read; clipboard-write"
scrolling="yes"
onload="resizeIframe(this)"
></iframe>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This iframe code block is duplicated in other files. Consider creating a reusable component or partial to avoid duplication and ensure consistency. This will make maintenance easier and reduce the risk of inconsistencies across the documentation.

shaneholloman pushed a commit to shaneholloman/praisonai that referenced this pull request Feb 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant